<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
    String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
    if(80==request.getServerPort())
    {
    	basePath = request.getScheme() + "://" + request.getServerName() + path + "/";
    }
	response.setHeader("Pragma", "no-cache");
	response.setDateHeader("Expires", 0);
	response.setHeader("Cache-Control",
			"no-store,no-cache,must-revalidate");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">

		<title>用户信息</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
	</head>

	<body>
	<div>
		<jsp:include page="./head.jsp"></jsp:include>
		<jsp:include page="./list.jsp"></jsp:include>
		<div class="bodycontent">
			<table style="margin:20px auto;width:500px;">
				<tr>
					<td class="tdleft">
						编号：
					</td>
					<td>
						<span><s:property value="#request.user.u_id" /></span>
					</td>
				</tr>
				<tr>
					<td class="tdleft">
						姓名：
					</td>
					<td>
						<input type="text" class="basic_input" value="<s:property value="#request.user.u_name"/>"
							id="u_name" readonly="readonly"/>
					</td>
				</tr>
				<s:if test="#request.oldpasswordShow == 1">
					<tr>
						<td class="tdleft">
							旧密码：
						</td>
						<td>
							<input type="password" id="old_password" class="basic_input" />
						</td>
					</tr>
				</s:if>
				<s:if test="#request.oldpasswordShow == 2">
					<tr style="display:none;">
						<td class="tdleft">
							旧密码：
						</td>
						<td>
							<input type="password" id="old_password" class="basic_input" value="<s:property value="#request.user.u_password" />"/>
						</td>
					</tr>
				</s:if>
				<tr>
					<td class="tdleft">
						新密码：
					</td>
					<td>
						<input type="password" id="u_password" class="basic_input" />
					</td>
				</tr>
				<tr>
					<td class="tdleft">
						确认新密码：
					</td>
					<td>
						<input type="password" id="new_password" class="basic_input" />
					</td>
				</tr>
				<s:if test="#request.user.u_type == 0">
					<tr>
						<td class="tdleft">
							成绩：
						</td>
						<td>
							<s:if test="#session.user.u_grade == -1">
								<s:property value="#session.user.u_grade_str" />
							</s:if>
							<s:else>
								<s:property value="#session.user.u_grade" />
							</s:else>
						</td>
					</tr>
				</s:if>
				<tr>
					<td colspan="2"><input type="button" value="确认修改" style="margin:0 200px;" onclick="revamp();"/></td>
				</tr>
			</table>
		</div>
	</div>
	</body>
</html>
